import java.util.Scanner;
import java.util.Arrays;
class Rectangle{
	private int width;
	private int length;
	public Rectangle(int width,int length){
		this.width =width;
		this.length=length;
	}
	
	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	public int getPerimeter(){
		return 2*(width+length);
	}
	public int getArea(){
		return width*length;
	}
}
class Circle{
	private int radius;
	public Circle(int radius){
          this.radius=radius;
	}
	
	public int getRadius() {
		return radius;
	}

	public void setRadius(int radius) {
		this.radius = radius;
	}

	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public int getPerimeter(){
		return (int)(2*this.radius*Math.PI);
	}
	public int getArea(){
		return (int)(Math.PI*this.radius*this.radius);
	}
	
}

public class RectCircle {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		Rectangle[] rectangles=new Rectangle[2];
		Circle[] circles=new Circle[2];
		for(int i=0;i<2;i++){
		  Rectangle rectangle=new Rectangle(in.nextInt(), in.nextInt());
          rectangles[i]=rectangle;
		}
		for(int j=0;j<2;j++){
			Circle circle=new Circle(in.nextInt());
	          circles[j]=circle;
		}
		int a=0,b=0;
		for(int j=0;j<2;j++){
			a+=circles[j].getPerimeter()+rectangles[j].getPerimeter();
			b+=circles[j].getArea()+rectangles[j].getArea();
		}
		System.out.println(a);
		System.out.println(b);
		System.out.println(Arrays.deepToString(rectangles));
		System.out.println(Arrays.deepToString(circles));
		in.close();
	}
}
